<?php

class Application_Form_Order extends Zend_Form
{

    public function init()
    {
    	
        $this->setName('Order')
        	->setMethod('post')
        	->setAttrib('id', 'create_order');
        
        $cust_no = new Zend_Form_Element_Text('cust_no');
        $cust_no->setLabel('Customer No')
        	->setRequired(true)
        	->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform')
        	->addErrorMessage('Error: Order No. cannot be empty');
        
        $prod_no = new Zend_Form_Element_Text('prod_no');
        $prod_no->setLabel('Product No')
        	->setRequired(true)
        	->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $item_qty = new Zend_Form_Element_Text('item_qty');
        $item_qty->setLabel('Order Quantity')
        	->setRequired(true)
        	->addFilter('StripTags')
        	->addFilter('StringTrim')
        	->setAttrib('class', 'short')
        	->setAttrib('id', 'zfform');
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submit');
        
        $this->addElements(array($cust_no, $prod_no, $item_qty, $submit));
        
        //$this->addDisplayGroup(array('cust_no'), 'cust');
		//$cust = $this->getDisplayGroup('cust');
		
		//$this->addDisplayGroup(array('prod_no'), 'prod');
		//$this->getDisplayGroup('prod');
		//$this->addDisplayGroup(array('submit'), 'sub');
		//$this->getDisplayGroup('sub');
		
    }


}

